<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html style="overflow-x:hidden;overflow-y:auto;"><head>
<title>地址管理</title>		
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">        
<!-- Mobile Devices Support @begin -->
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
<meta content="no-cache" http-equiv="pragma">
<meta content="0" http-equiv="expires">
<meta content="telephone=no, address=no" name="format-detection">
<meta name="apple-mobile-web-app-capable" content="yes"> <!-- apple devices fullscreen -->
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<style type="text/css">
.px {
	background-color: transparent;
	color: #999999;
	display: block;
	width: 85%; 
	padding:10px;
	font-size: 16px;
	font-family:Arial, Helvetica, sans-serif;
	border:0;
	-webkit-appearance:none;
	border:1px solid #e7e7e7;
	-webkit-box-shadow: 0 0 3px 0 #eeeeee inset;
	-moz-box-shadow: 0 0 3px 0 #eeeeee inset;
	box-shadow: 0 0 3px 0 #eeeeee inset;
	border-radius: 3px;
}
.px1 {
	background-color: transparent;
	color: #999999;
	padding:10px;
	font-size: 16px;
	font-family:Arial, Helvetica, sans-serif;
	border:0;
	-webkit-appearance:none;
	border:1px solid #e7e7e7;
	-webkit-box-shadow: 0 0 3px 0 #eeeeee inset;
	-moz-box-shadow: 0 0 3px 0 #eeeeee inset;
	box-shadow: 0 0 3px 0 #eeeeee inset;
	border-radius: 3px;
}
.control-label{
	line-height:30px;
}
.btn-success {
    background-color: #5CB85C;
    border-color: #4CAE4C;
    color: #FFFFFF;
}
.btn-danger {
    background-color: #D9534F;
    border-color: #D43F3A;
    color: #FFFFFF;
}
.btn {
    -moz-user-select: none;
    background-image: none;
    border: 1px solid rgba(0, 0, 0, 0);
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.42857;
    margin-bottom: 0;
    padding: 6px 12px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}
.formactions{line-height:45px;heihgt:45px;border-bottom:none; text-align:center}
</style>
<link rel="stylesheet" type="text/css" href="${ctxStatic }/shopping/common.css" media="all">
<link rel="stylesheet" type="text/css" href="${ctxStatic }/shopping/list.css" media="all">
<link rel="stylesheet" type="text/css" href="${ctxStatic }/shopping/list_css.css" media="all">
<link rel="stylesheet" type="text/css" href="${ctxStatic }/shopping/home-menu-8.css" media="all">
<link rel="stylesheet" type="text/css" href="${ctxStatic }/shopping/font-awesome.css" media="all">
<script type="text/javascript" src="${ctxStatic }/shopping/pccs.js" />

<script type="text/javascript">
function onBridgeReady(){
	 WeixinJSBridge.call('hideOptionMenu');
	}

	if (typeof WeixinJSBridge == "undefined"){
	    if( document.addEventListener ){
	        document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
	    }else if (document.attachEvent){
	        document.attachEvent('WeixinJSBridgeReady', onBridgeReady); 
	        document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
	    }
	}else{
	    onBridgeReady();
	}

		$(document).ready(function() {
			document.title = "地址管理";
		});
		
		
		function showDetail(id){
			var flag = $('#'+id).css("display");
			
			if( flag ===  'block'){
				$('#'+id).hide();
			}else{
				$('#'+id).show();
			}
		}

		
		
		$(function(){
			$("#movie").click(function(event) {
				$("#subOrder").hide();
				$("#order").removeClass("active");
				$("#hide").hide();
				if($("#subMovie").is(":visible")==false){
					$("#subMovie").show();
					$("#movie").addClass("active");
					$("#hide").show();
				}else{
					$("#subMovie").hide();
					$("#movie").removeClass("active");
					$("#hide").hide();
				};
			});
			
			$("#order").click(function(event) {
				$("#subMovie").hide();
				$("#movie").removeClass("active");
				$("#hide").hide();
				if($("#subOrder").is(":visible")==false){
					$("#subOrder").show();
					$("#order").addClass("active");
					$("#hide").show();
				}else{
					$("#subOrder").hide();
					$("#order").removeClass("active");
					$("#hide").hide();
				};
			});
		});
	</script>
</head>

<body>
<div class="body"   style="padding-bottom:120px;">
<div class="titlew" style="background:#E4393C;" >编辑地址</div>
  <section class="w-goods">
           <form:form id="inputForm" modelAttribute="memberAddress" action="${ctxFront }/site/shopping/saveAddress?productId=${productId }&type=${type }" method="post" class="form-horizontal">
           		 <input type="hidden" name="uid" value="${uid }">
 				 <input type="hidden" name="wechatId" value="${wechatId }"/>
				<form:hidden path="id"/>
				<form:hidden path="user.id"  value="${uid }"/>
				<div class="control-group" style="margin-top:10px;padding-left:15px;">
				<label class="control-label"  style="">省市区:</label>
						<div>
					            <select name="province" id="province" class="px1">
					            </select>
					            <select name="city" id="city" class="px1">
					            </select>
					                <select name="county" id="county" class="px1">
					                </select>
					        </div>
					    <script language="javascript">
					        setup() 
					    </script>
				</div>
				<div class="control-group" style="margin-top:10px;padding-left:15px;">
					<label class="control-label"  style="">收件人姓名:</label>
						<form:input path="name" htmlEscape="false" maxlength="11" class="required px" value="" />
				</div>
				<div class="control-group" style="margin-top:10px;padding-left:15px;">
					<label class="control-label"  style="">手机号码:</label>
						<form:input path="mobile" htmlEscape="false"  class="required px"/>
				</div>
				<div class="control-group" style="margin-top:10px;padding-left:15px;">
					<label class="control-label"  style="">详细地址:</label>
						<form:input path="detail" htmlEscape="false"  class="required px" />
				</div>
				<div class="control-group" style="margin-top:10px;padding-left:15px;">
					<label class="control-label"  style="">邮政编码:</label>
						<form:input path="code" htmlEscape="false" class="required px"/>
				</div>
				<label class="control-label"  >
				<div class="control-group" style="margin-top:10px;padding-left:15px;">
					设为默认地址:<form:checkbox path="selected" htmlEscape="false"  value="1" style="padding:50px;float:right;" />
				</div>
				</label>
				<div class="formactions">
				<input id="btnSubmit" class="btn btn-success" type="submit" value="保 存"/>	<input id="btnSubmit" class="btn btn-danger" type="button" value="删除"  onclick="location='${ctxFront }/site/shopping/deleteAddress?id=${memberAddress.id}&uid=${uid}&wechatId=${wechatId}'" />
			</div>
		</form:form>
  </section>
</div>
<jsp:include page="./footer.jsp"></jsp:include>
</body>
</html>
